



import 'dart:io';

import 'package:amap_location/amap_location.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
//import 'pages/tab.dart';

import 'routers/routers.dart';
void main(List<String> args) {
  AMapLocationClient.setApiKey("d6372e4a6ed264a14875d13b0bef2d55");
  runApp(MyApp());
  /// Android状态栏透明
  if (Platform.isAndroid) {
    SystemUiOverlayStyle systemUiOverlayStyle =
        SystemUiOverlayStyle(statusBarColor: Colors.transparent);
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }
}

///自定义组件
class MyApp extends StatelessWidget {
  MyApp({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      //home: Tabs(),
      initialRoute: '/',///初始化的路由
      theme: ThemeData(primarySwatch: Colors.lightGreen),
      debugShowCheckedModeBanner: false,
      onGenerateRoute: onGenerateRoute
    );
  }
}

